<template>
  <div class="index-container">
    <div class="nav" >
      <ul>
        <li>
          <router-link to="/discovery">
            <span class="iconfont icon-tubiao67"></span>
            发现音乐
          </router-link>
        </li>
        <li>
          <router-link to="/playlists">
            <span class="iconfont icon-icon-music-lsit"></span>
            推荐歌单
          </router-link>
        </li>
        <li>
          <router-link to="/songs">
            <span class="iconfont icon-music"></span>
            最新音乐
          </router-link>
        </li>
        <li>
          <router-link to="/mvs">
            <span class="iconfont icon-bofangMV"></span>
            最新MV
          </router-link>
        </li>
      </ul>
    </div>
    <div class="main">
      <router-view></router-view>
    </div>
    <div class="player">
       <!-- @func = "circlePlay"  -->
      <audio
       id="myAudio"
       :src='musicUrl' 
       controls 
       autoplay
       ></audio>
    </div>
  </div>
</template>

<script>
export default {
  name: 'index',
  data() {
    return {
      musicUrl:""
    };
  },
  methods:{
    overAudio(){
      let aud = document.getElementById("myAudio");
      aud.addEventListener("ended", function() 
      {
          console.log("歌曲已经播放结束！");
      });
    }
  }
};
</script>

<style scoped>
</style>
